﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using G15_Agent.BUS;

namespace G15_Agent.Helpers.ServiceHelpers.AirplaneServiceHelpers
{
    public class G03AirplaneService : AirplaneService
    {
        public G03AirplaneService(string serviceID, string defaultUsername, string defaultPassword)
        {
            ServiceID = serviceID;
            DefaultUsername = defaultUsername;
            DefaultPassword = defaultPassword;
        }

        protected override bool CallSpecificServiceLogin(string username, string password)
        {
            return BUS_Manager.airplane.DangNhap_G03(username, password);
        }

        public override List<Models.Airplane.SanBay> IGetDepartAirport()
        {
            return BUS_Manager.airplane.LayDanhSachSanBayDi_G03();
        }

        public override List<Models.Airplane.SanBay> IGetArrivalAirport()
        {
            return BUS_Manager.airplane.LayDanhSachSanBayDen_G03();
        }

        public override List<Models.Airplane.LoaiVe> IGetTicketType()
        {
            return BUS_Manager.airplane.LayDanhSachLoaie_G03();
        }

        public override double? IGetTicketPrice(string ticketTypeID, Models.Airplane.SanBay departure, Models.Airplane.SanBay arrival, string tripType, DateTime departDate, string departTime)
        {
            return BUS_Manager.airplane.LayGiaVe_G03(ticketTypeID, departure, arrival, tripType, departDate, departTime);
        }

        public override Models.Airplane.HoaDonMayBay IBookingTicket(string ticketTypeID, DateTime departDate, DateTime returnDate, string tripType, string departAirportID, string arriveAirportID, List<Models.Airplane.KhachHang> listPassenger)
        {
            return BUS_Manager.airplane.DatVeMayBay_G03(ticketTypeID, departDate, returnDate, tripType, departAirportID, arriveAirportID, listPassenger);
        }

        public override List<Models.Airplane.ChuyenBay> ISearchForTicket(int numberOfChilren, int numberOfAdult, string ticketTypeID, DateTime departDate, DateTime returnDate, string tripType, string departAirport, string arriveAirport)
        {
            return BUS_Manager.airplane.TimChuyenBay_G03(numberOfChilren, numberOfAdult, ticketTypeID, departDate, returnDate, tripType, departAirport, arriveAirport);
        }
    }
}